package com.zt.english.views

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.FrameLayout
import com.zt.english.R
/**
Describe：左侧抽屉view
Author:ztind
Date:2021/6/21
 */
class DrawerView: FrameLayout{
    constructor(context: Context) : super(context) {
        init(context)
    }
    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
        init(context)
    }
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
        init(context)
    }
    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int) : super(context, attrs, defStyleAttr, defStyleRes) {
        init(context)
    }
    private fun init(context:Context){
        val view = LayoutInflater.from(context).inflate(R.layout.layout_drawer,null,false)
        this.addView(view)
    }
}